var e = require("../../../@babel/runtime/helpers/interopRequireDefault").default, a = e(require("@vant/weapp/dialog/dialog")), t = e(require("../../../api/api_shareCard")), i = e(require("../../../utils/Tips")), r = require("../../../config/Links"), n = e(require("../../../behaviors/aucMiniAuth")), s = getApp();

s.eventBus;

Component({
    behaviors: [ n.default ],
    properties: {},
    data: {
        actionEndFlag: !1,
        arr: [ 0, 2 ],
        shareCardImageBaseUrl: r.imageBaseUrl.shareCard,
        headimg: r.imageBaseUrl.shareCard + "headimg_default.png",
        list: []
    },
    attached: function() {
        s.globalData.actionEndFlag && (this.setData({
            actionEndFlag: !0
        }), wx.hideShareMenu()), this.getShareRecord();
    },
    methods: {
        getShareRecord: function() {
            var e = this, r = this;
            wx.showLoading({
                title: "加载中"
            }), t.default.getInviteOrder().then(function(t) {
                wx.hideLoading(), console.log("获取分享记录成功", t);
                var n = t.code, s = t.result, o = t.msg;
                "0" === n ? ((!s || s.length <= 0) && i.default.toast("您还没有分享记录哦，快去邀请小伙伴吧~"), e.setData({
                    list: s
                })) : "0" !== n && a.default.alert({
                    context: r,
                    message: o
                });
            }).catch(function(e) {
                console.log("获取分享记录失败", e), wx.hideLoading();
            });
        }
    }
});